﻿@namespace BootstrapBlazor
@inherits BootstrapComponentBase

<li @ref="@Element" class="@Classname" style="@Style" @attributes="@AdditionalAttributes">
    <a href="javascript:void(0)" class="@ToggleClassname" @onclick="@Toggle">@Title</a>
    <ul class="@MenuClassname">
        @if (ChildContent != null)
        {
            @ChildContent
        }
        else
        {
            if (!string.IsNullOrWhiteSpace(HeaderText))
            {
                <li><h6 class="dropdown-header">@HeaderText</h6></li>
            }
            @MenuContent
        }

        @if(Show)
        {
            <div class="dropdown-overlay" @onclick="@Toggle"></div>
        }
    </ul>
</li>